package com.kc.business.domain;

import lombok.Data;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * TODO
 * 市场商家
 *
 * @author zhangshuo
 * @version 1.0
 * @date 2020/9/9
 */
@Data
@Table(name = "kc_market_business")
public class BizMarketBusiness implements Serializable {
    private static final long serialVersionUID = 1866919162047106710L;

    @Id
    private Integer id;
    /** 商家名称 */
    @NotBlank(message = "商家名称不能为空")
    private String name;
    /** APP用户id */
    @NotNull(message = "用户id不能为空")
    private Integer userId;
    /** 所属市场id */
    private Integer marketId;
    /** logo */
    private String logo;
    /** 商家图片 */
    private String image;
    /** 商家地址 */
    private String address;
    /** 小店介绍 */
    private String content;
    /** 商家图片数组 */
    @Transient
    private String[] images;
    /** 经度 */
    @NotNull(message = "经度不能为空")
    @DecimalMin(value = "-180", message = "经度有误")
    @DecimalMax(value = "180", message = "经度有误")
    private BigDecimal longitude;
    /** 纬度 */
    @NotNull(message = "纬度不能为空")
    @DecimalMin(value = "-90", message = "经度有误")
    @DecimalMax(value = "90", message = "经度有误")
    private BigDecimal latitude;
    /** 租户id */
    private Integer tenantId;
    /** 删除状态：1已删除，0未删除 */
    private Integer isDeleted;
    /** 状态:1显示，0隐藏 */
    private Integer status;
    /** 创建时间 */
    private LocalDateTime createTime;
}
